package com.example.reader.controller;

import com.example.reader.common.Result;
import com.example.reader.entity.PostsSection;
import com.example.reader.service.PostsSectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

//分模块的帖子
@RestController
@RequestMapping("/postsSection")
public class PostsSectionController {
    @Autowired
    private PostsSectionService postsSectionService;

    @GetMapping("/selectAll")
    public Result selectAll(PostsSection postsSection) {
        List<PostsSection> list = postsSectionService.selectAll(postsSection);
        return Result.success(list);
    }
}
